package tomoto.util;

/**
 * Generic utility functions for String.
 * 
 * @author Tomoto Shimizu Washio
 * 
 */
public class StrUtil {
	@Deprecated
	private StrUtil() {
	}

	/**
	 * Returns true if the string is null or empty.
	 * 
	 * @param value string to test
	 * @return as described above
	 */
	public static boolean isBlank(String value) {
		return value == null || value.length() == 0;
	}
	
	public static void appendDelimited(StringBuilder sb, String value, String delimiter) {
	    if (sb.length() > 0) {
	        sb.append(delimiter);
	    }
	    sb.append(value);
	}
}
